package com.nursinghome.admin.service;

import com.nursinghome.bean.MedicalStaff;
import com.nursinghome.exception.NurisingHomeException;

import java.util.List;

public interface MedicalStaffService {
    //查询所有护工
    List<MedicalStaff> selectAll(String mname, String mphone, String musername);
    //新增护工
    /**
     * 在护工表中新建创建一个护工
     * 在user表中查询这个员工是否存在如果存在就抛出异常
     * 在user表中创建一个账号默认密码123123
     * */
    Boolean addMedical(MedicalStaff medicalStaff) throws Exception;
    //修改护工
    Boolean updateMedical(MedicalStaff medicalStaff) throws NurisingHomeException;
    //删除护工
    Boolean deleteMedical(Integer mid) throws NurisingHomeException;
    //根据护工id查询
    MedicalStaff selectByMid(Integer mid);
    //根据护工号查询
    MedicalStaff selectByMno(String mno);
    Integer selectByMusername(String musername);
    // 根据老人查询护工
    List<MedicalStaff> selectByEid(Long eid, Integer serviceId);

}
